package cn.goktech.controller;

import cn.goktech.bean.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/ex2")
public class ExcepController2 {
    @RequestMapping("/testException")
    public String testException() {
        int i = 10 / 0;
        return "success";
    }

    @RequestMapping("/testException2")
    public String testException2() {
        User user = null;
        user.getName();
        return "success";
    }


}
